#include <cfixcc.h>
#include "FileProcessing.h"

char * tests[] = {
	"\\&",
	"\\\\",
	"\\|",
	"\\#",
	"\\+",
	"\\*",
	"\\?",
	"\\{}",
	"\\()",
	"\\-",
	"\\i",
	"\\v",
	"\\.",
	"\\t",
	"\\^",
	"\\$",
	"\\[",
	"\\]",
	"\\[^",
	"\\d",
	"\\D",
	"\\s",
	"\\S",
	"\\w",
	"\\W",
	"abc",
	"ab\\i",
	"\\iop",
	"\\",
	"\\o"
};

unsigned int amount = 30;

class CheckLexemTest : public cfixcc::TestFixture
{
	//private:

public:
	void AllTests()
	{
		CFIX_LOG("Start checking CheckLexem");

		unsigned int k = -1;
		string tmp;
		for (k += 1; k < amount; ++k)
		{
			try
			{ CheckLexem(tests[k]); }
			catch (string & ex)
			{
				if (k < 26)
				{ CFIX_ASSERT_MESSAGE(0, L"%s Test: %s", ex.c_str(), tests[k]); }
			}
		}

		CFIX_LOG("End checking CheckLexem");
	}
};

CFIXCC_BEGIN_CLASS(CheckLexemTest)
CFIXCC_METHOD(AllTests)
CFIXCC_END_CLASS()